<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SkyGameEngine2d: SkyEngine2d::Application类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="shpe.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SkyGameEngine2d
   &#160;<span id="projectnumber">1.0.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>SkyEngine2d</b></li><li class="navelem"><a class="el" href="class_sky_engine2d_1_1_application.html">Application</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_sky_engine2d_1_1_application-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">SkyEngine2d::Application类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>应用程序的实例  
 <a href="class_sky_engine2d_1_1_application.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_application_8h_source.html">Application.h</a>&gt;</code></p>
<div class="dynheader">
类 SkyEngine2d::Application 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_sky_engine2d_1_1_application.png" usemap="#SkyEngine2d::Application_map" alt=""/>
  <map id="SkyEngine2d::Application_map" name="SkyEngine2d::Application_map">
<area href="class_sky_engine2d_1_1_i_application.html" title="应用程序实例的接口" alt="SkyEngine2d::IApplication" shape="rect" coords="0,0,165,24"/>
<area href="class_sky_engine2d_1_1_i_process_msg.html" title="程序消息处理接口" alt="SkyEngine2d::IProcessMsg" shape="rect" coords="175,0,340,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a3fce6ebf2ce763b935d79c4e288fb3b3"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_application.html#a3fce6ebf2ce763b935d79c4e288fb3b3">run</a> () override</td></tr>
<tr class="memdesc:a3fce6ebf2ce763b935d79c4e288fb3b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">开始运行程序  <a href="#a3fce6ebf2ce763b935d79c4e288fb3b3">更多...</a><br /></td></tr>
<tr class="separator:a3fce6ebf2ce763b935d79c4e288fb3b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a527a2528a7b03eabf41373bc1f32555c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_application.html#a527a2528a7b03eabf41373bc1f32555c">setPerFrameInterval</a> (double interval) override</td></tr>
<tr class="memdesc:a527a2528a7b03eabf41373bc1f32555c"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置每帧的间隔  <a href="#a527a2528a7b03eabf41373bc1f32555c">更多...</a><br /></td></tr>
<tr class="separator:a527a2528a7b03eabf41373bc1f32555c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f8913e34987a3b2deefa634992bcd51"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_application.html#a9f8913e34987a3b2deefa634992bcd51">setAppDelegte</a> (<a class="el" href="class_sky_engine2d_1_1_i_app_delegate.html">IAppDelegate</a> *app_delegate) override</td></tr>
<tr class="memdesc:a9f8913e34987a3b2deefa634992bcd51"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置APP 的代理  <a href="#a9f8913e34987a3b2deefa634992bcd51">更多...</a><br /></td></tr>
<tr class="separator:a9f8913e34987a3b2deefa634992bcd51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1c1d59e26356b82d328cd124d4f79f5"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_sky_engine2d_1_1_i_application_view.html">IApplicationView</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_application.html#af1c1d59e26356b82d328cd124d4f79f5">getAppView</a> () const override</td></tr>
<tr class="memdesc:af1c1d59e26356b82d328cd124d4f79f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取应用程序的视图  <a href="#af1c1d59e26356b82d328cd124d4f79f5">更多...</a><br /></td></tr>
<tr class="separator:af1c1d59e26356b82d328cd124d4f79f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab217eaa607affa06af6aba57b5f8621f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_application.html#ab217eaa607affa06af6aba57b5f8621f">setWinMsgFilter</a> (const WinMsgFilter &amp;filter) override</td></tr>
<tr class="memdesc:ab217eaa607affa06af6aba57b5f8621f"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置windows 消息的过滤器  <a href="#ab217eaa607affa06af6aba57b5f8621f">更多...</a><br /></td></tr>
<tr class="separator:ab217eaa607affa06af6aba57b5f8621f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d53b0d0d29e29b15fffa20bf2f89f40"><td class="memItemLeft" align="right" valign="top">virtual const std::wstring &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_application.html#a1d53b0d0d29e29b15fffa20bf2f89f40">getAppDir</a> () override</td></tr>
<tr class="memdesc:a1d53b0d0d29e29b15fffa20bf2f89f40"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取程序的根目录  <a href="#a1d53b0d0d29e29b15fffa20bf2f89f40">更多...</a><br /></td></tr>
<tr class="separator:a1d53b0d0d29e29b15fffa20bf2f89f40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad204f7f4fe91c3b5a43bf47108806b4c"><td class="memItemLeft" align="right" valign="top"><a id="ad204f7f4fe91c3b5a43bf47108806b4c"></a>
virtual LRESULT&#160;</td><td class="memItemRight" valign="bottom"><b>processMsg</b> (HWND hwnd, UINT msg, WPARAM wParam, LPARAM IParam) override</td></tr>
<tr class="separator:ad204f7f4fe91c3b5a43bf47108806b4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:aef8eec58fbaa60a2039aaf2dd5a13c8e"><td class="memItemLeft" align="right" valign="top"><a id="aef8eec58fbaa60a2039aaf2dd5a13c8e"></a>
static <a class="el" href="class_sky_engine2d_1_1_i_application.html">IApplication</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getInstance</b> ()</td></tr>
<tr class="separator:aef8eec58fbaa60a2039aaf2dd5a13c8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>应用程序的实例 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a1d53b0d0d29e29b15fffa20bf2f89f40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d53b0d0d29e29b15fffa20bf2f89f40">&#9670;&nbsp;</a></span>getAppDir()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::wstring&amp; SkyEngine2d::Application::getAppDir </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取程序的根目录 </p>
<dl class="section return"><dt>返回</dt><dd>std::wstring </dd></dl>

<p>实现了 <a class="el" href="class_sky_engine2d_1_1_i_application.html#aabca95ef0afe8c00caa6948aea676ded">SkyEngine2d::IApplication</a>.</p>

</div>
</div>
<a id="af1c1d59e26356b82d328cd124d4f79f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1c1d59e26356b82d328cd124d4f79f5">&#9670;&nbsp;</a></span>getAppView()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_sky_engine2d_1_1_i_application_view.html">IApplicationView</a>* SkyEngine2d::Application::getAppView </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取应用程序的视图 </p>
<dl class="section return"><dt>返回</dt><dd>IApplicationView* </dd></dl>

<p>实现了 <a class="el" href="class_sky_engine2d_1_1_i_application.html#aa588509f686c4e9258f555ecb5d2e883">SkyEngine2d::IApplication</a>.</p>

</div>
</div>
<a id="a3fce6ebf2ce763b935d79c4e288fb3b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3fce6ebf2ce763b935d79c4e288fb3b3">&#9670;&nbsp;</a></span>run()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int SkyEngine2d::Application::run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>开始运行程序 </p>
<dl class="section return"><dt>返回</dt><dd>int </dd></dl>

<p>实现了 <a class="el" href="class_sky_engine2d_1_1_i_application.html#a28e5ef4747ab1957e5a97f19ce406822">SkyEngine2d::IApplication</a>.</p>

</div>
</div>
<a id="a9f8913e34987a3b2deefa634992bcd51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f8913e34987a3b2deefa634992bcd51">&#9670;&nbsp;</a></span>setAppDelegte()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SkyEngine2d::Application::setAppDelegte </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_sky_engine2d_1_1_i_app_delegate.html">IAppDelegate</a> *&#160;</td>
          <td class="paramname"><em>app_delegate</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置APP 的代理 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">AppDelegateInterface</td><td>* app_delegate 代理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void 开发者需要继承代理的接口，并且重写其中的函数，以实现一下特殊的功能 </dd></dl>

<p>实现了 <a class="el" href="class_sky_engine2d_1_1_i_application.html#a062df8b6e64ad858d8da7b143dd4a3c1">SkyEngine2d::IApplication</a>.</p>

</div>
</div>
<a id="a527a2528a7b03eabf41373bc1f32555c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a527a2528a7b03eabf41373bc1f32555c">&#9670;&nbsp;</a></span>setPerFrameInterval()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SkyEngine2d::Application::setPerFrameInterval </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>interval</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置每帧的间隔 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">double</td><td>interval 每帧的间隔 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void 该API用来设置游戏的帧数，一般在 AppDelegte 中调用，默认帧数为 30 <em>app-&gt;setPerFrameInterval</em>(1/30.0f) </dd></dl>

<p>实现了 <a class="el" href="class_sky_engine2d_1_1_i_application.html#a4ff39d236646733e4000e8b20f704446">SkyEngine2d::IApplication</a>.</p>

</div>
</div>
<a id="ab217eaa607affa06af6aba57b5f8621f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab217eaa607affa06af6aba57b5f8621f">&#9670;&nbsp;</a></span>setWinMsgFilter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SkyEngine2d::Application::setWinMsgFilter </td>
          <td>(</td>
          <td class="paramtype">const WinMsgFilter &amp;&#160;</td>
          <td class="paramname"><em>filter</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置windows 消息的过滤器 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td>WinMsgFilter &amp; filter 消息过滤器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void 消息过滤器 允许 开发者有机会自定义的处理 windows 消息，如果不需要 引擎继续处理该消息，则返回 <em>true，否则应该返回</em> <em>false</em> </dd></dl>

<p>实现了 <a class="el" href="class_sky_engine2d_1_1_i_application.html#abafe657889ff1b11382d2cd740a7edae">SkyEngine2d::IApplication</a>.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>C:/code/SkyGameEngine2d/src/win32/<a class="el" href="_application_8h_source.html">Application.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
